package com.ruoyi.merchant.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.ServiceManagementMapper;
import com.ruoyi.merchant.domain.ServiceManagement;
import com.ruoyi.merchant.service.IServiceManagementService;

/**
 * 服务管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-09
 */
@Service
public class ServiceManagementServiceImpl implements IServiceManagementService 
{
    @Autowired
    private ServiceManagementMapper serviceManagementMapper;

    /**
     * 查询服务管理
     * 
     * @param smId 服务管理主键
     * @return 服务管理
     */
    @Override
    public ServiceManagement selectServiceManagementBySmId(Long smId)
    {
        return serviceManagementMapper.selectServiceManagementBySmId(smId);
    }

    /**
     * 查询服务管理列表
     * 
     * @param serviceManagement 服务管理
     * @return 服务管理
     */
    @Override
    public List<ServiceManagement> selectServiceManagementList(ServiceManagement serviceManagement)
    {
        return serviceManagementMapper.selectServiceManagementList(serviceManagement);
    }

    /**
     * 新增服务管理
     * 
     * @param serviceManagement 服务管理
     * @return 结果
     */
    @Override
    public int insertServiceManagement(ServiceManagement serviceManagement)
    {
        serviceManagement.setCreateTime(DateUtils.getNowDate());
        return serviceManagementMapper.insertServiceManagement(serviceManagement);
    }

    /**
     * 修改服务管理
     * 
     * @param serviceManagement 服务管理
     * @return 结果
     */
    @Override
    public int updateServiceManagement(ServiceManagement serviceManagement)
    {
        return serviceManagementMapper.updateServiceManagement(serviceManagement);
    }

    /**
     * 批量删除服务管理
     * 
     * @param smIds 需要删除的服务管理主键
     * @return 结果
     */
    @Override
    public int deleteServiceManagementBySmIds(Long[] smIds)
    {
        return serviceManagementMapper.deleteServiceManagementBySmIds(smIds);
    }

    /**
     * 删除服务管理信息
     * 
     * @param smId 服务管理主键
     * @return 结果
     */
    @Override
    public int deleteServiceManagementBySmId(Long smId)
    {
        return serviceManagementMapper.deleteServiceManagementBySmId(smId);
    }
}
